<template>
	<view>


        <view class="hlbblock" style="padding: 20rpx" v-for="(item,index) in recordList">
            <view style="font-weight: bold">
                {{item.record_name}}
            </view>
            <view style="color: rgba(0,0,0,0.56);font-size: 24rpx">
                {{item.create_time}}
            </view>


        </view>
        <view class="d-c-c p30" v-if="recordList.length==0 && !loading">
            <text class="iconfont icon-wushuju"></text>
            <text class="cont">亲，暂无相关记录哦</text>
        </view>
        <!--<uni-load-more v-else :loadingType="loadingType"></uni-load-more>-->


	</view>
</template>

<script>
    var _self;
	import uniLoadMore from "@/components/uni-load-more.vue";
	export default {
		components: {
			uniLoadMore
		},
		data() {
			return {

				/*手机高度*/
				phoneHeight: 0,
				/*可滚动视图区域高度*/
				scrollviewHigh: 0,
				/*状态选中*/
				state_active: -1,
				/*数据列表*/
				tableData: [],
				no_more: false,
				loading: true,
				/*最后一页码数*/
				last_page: 0,
				/*当前页面*/
				page: 1,
				/*每页条数*/
				list_rows: 20,
				tableList: [],
                recordList: [],


			}
		},
		computed: {

			/*加载中状态*/
			loadingType() {
				if (this.loading) {
					return 1;
				} else {
					if (this.tableData.length != 0 && this.no_more) {
						return 2;
					} else {
						return 0;
					}
				}
			}
		},
		mounted() {
			/*初始化*/
			this.init();
			/*获取数据*/
			this.getData();
		},
		methods: {
			/*初始化*/
			init() {
                _self =this;
				let self = this;


			},
			/*获取数据*/
			getData() {
                let self = this;
                self.loading = true;
                self._post('plus.lottery.Lottery/record', {
                        list_rows: self.list_rows,
                        page: self.page || 1,
                    },
                    function(res) {
                        console.log(res)
                        self.loading = false;
                        self.recordList = self.recordList.concat(res.data.list.data);
                        self.last_page = res.data.list.last_page;
                        if (res.data.list.last_page <= 1) {
                            self.no_more = true;
                        }
                    })
			},



            /*可滚动视图区域到底触发*/
            onReachBottom() {
                console.log(123)
                let self = this;
                self.page++;
                self.loading = true;
                if (self.page > self.last_page) {
                    self.loading = false;
                    self.no_more = true;
                    return;
                }
                self.getList();
            },
		}
	}
</script>

<style lang="scss">
    .actday{
        border-bottom: 1px #FF4849 solid;
        .ditem{
            color: #FF4849;
        }
    }
    .day{
        .ditem{
            color: rgba(0, 0, 0, 0.69);
        }
    }

</style>
